package com.zpark.user.controller;

import com.zpark.user.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zpark.user.service.UserService;


import javax.annotation.Resource;

/**
 * TODO
 *
 * @Description
 * @Author zhangbing
 * @Date 2024/4/15 11:34
 **/
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/{id}")
    public User findById(@PathVariable Long id){
            /*try {
                Thread.sleep(3000);
            }catch (InterruptedException e){
                e.printStackTrace();
            }*/
        return userService.findById(id);
    }


}
